define(() => {
    return function (data) {
        $(".swer").children("img").attr("src", data.url);
        $("#b_box").children("img").attr("src", data.url);
        $(".title :nth-child(1)").html(data.product_name);
        $(".title :nth-child(2)").html(data.title);
        $(".price :nth-child(2)").html(data.price);
        $(".del-1 img").attr("src", data.url);
        const imgs = data.imgs || [];
        let str = "";
        for (var i = 0; i < imgs.length; i++) {
            str += `<div class="pre-1">
            <img src="${imgs[i]}" alt="">
        </div>`
        }
        $(".preview-list").html(str)
        const list = $(".preview-list div")
        $.each(list, function (i, obj) {
            $(obj).on("mousemove", function () {
                $(".swer").children("img").attr("src", $(this).children("img").attr("src"));
                $("#b_box").children("img").attr("src", $(this).children("img").attr("src"));
            });
        })
    }
})